<?php
#####################################
# * @Author: lehieu008              #
# * @Email: lehieu008@gmail.com     #
# * @Copyright: 2010 - 2011         #
#####################################
if(!defined('BASEPATH'))exit('No direct script access allowed');
?>
<?php $this->load->view('home/global/header'); ?>
<!--BEGIN: Main-->
<div class="main">
	<div class="box" style="height:215px;">
    	<?php echo Modules::run('home/product_module/hot', true); ?>
        <?php echo Modules::run('home/banner_module/index'); ?>
    </div>
    <div class="column">
    	<?php echo Modules::run('home/menu_module/index'); ?>
        <?php echo Modules::run('home/banner_module/index', 6, 3, false); ?>
    </div>
    <div class="content">
    	<?php echo Modules::run('home/message_module/index'); ?>
        <?php echo Modules::run('home/banner_module/index', 2); ?>
        <?php if(isset($introProduct1) && count($introProduct1) == 1 && isset($introProduct2) && count($introProduct2) == 1): ?>
        <div class="box" style="height:360px;">
        	<div class="left">
            	<div class="titleBG">
                	<div class="oTitleBG">
                    	<div class="iTitleBG">
                        	<div class="txt"><?php echo $introProduct1->secName; ?></div>
                        </div>
                    </div>
                </div>
                <div class="borderBlue367 mTop5">
                	<div class="oBorderBlue367">
                    	<div class="iBorderBlue367">
                        	<div class="newUp">
                            	<div class="top">
                                	<div class="img">
                                    	<a href="<?php echo base_url(); ?>product/section/<?php echo $introProduct1->proSection; ?>/category/<?php echo $introProduct1->proCategory; ?>/detail/<?php echo $introProduct1->proID; ?>/<?php echo url($introProduct1->proName); ?>" title="">
                                            <img src="<?php echo base_url().multi_thumbnail('thumbnail90X100_', $introProduct1->proImage, IMAGE_PATH.'product/'.$introProduct1->proDirImage.'/'); ?>" width="90" height="100" alt="<?php echo $introProduct1->proName; ?>" />
                                        </a>
                                    </div>
                                    <div class="info">
                                    	<ul>
                                        	<li class="title">
                                            	<a href="<?php echo base_url(); ?>product/section/<?php echo $introProduct1->proSection; ?>/category/<?php echo $introProduct1->proCategory; ?>/detail/<?php echo $introProduct1->proID; ?>/<?php echo url($introProduct1->proName); ?>" title="">
                                                    <?php echo sub($introProduct1->proName, 35); ?>
                                                </a>
                                            </li>
                                            <li>
                                            	<span class="label">Giá bán:</span>
                                                <span class="red"><b><?php if((int)$introProduct1->proPrice > 0){echo currency($introProduct1->proPrice).' '.$introProduct1->proCurrency;}else{echo lang('CALL');} ?></b></span>
                                                <!--<span class="gray"><i>(12.000 USD)</i></span>-->
                                            </li>
                                            <li>
                                            	<span class="label">Nơi bán:</span>
                                                <span><?php echo $introProduct1->preName; ?></span>
                                            </li>
                                            <li>
                                            	<span class="label">Cửa hàng:</span>
                                                <span>
                                                	<a class="vtip" href="<?php echo base_url().$introProduct1->shoLink; ?>" title=""><?php echo $introProduct1->shoName; ?></a>
                                                </span>
                                            </li>
                                            <li>
                                            	<span class="label">Bình chọn:</span>
                                                <span>
                                                    <?php for($i = 1; $i <= 5; $i++): ?>
                                                        <?php if((int)$introProduct1->proVote > 0 && $i <= (int)round(($introProduct1->proCountVote/$introProduct1->proVote))): ?>
                                                    	   <img src="<?php echo base_url(); ?>templates/home/images/starYellow1.gif" align="absmiddle" alt="" />
                                                        <?php else: ?>
                                                            <img src="<?php echo base_url(); ?>templates/home/images/starYellow0.gif" align="absmiddle" alt="" />
                                                        <?php endif; ?>
                                                    <?php endfor; ?>
                                                </span>
                                                <span class="blue"><b>[<?php echo $introProduct1->proVote; ?>]</b></span>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <hr />
                                <div class="bottom">
                                	<!--LOOP-->
                                    <?php $index = 1; ?>
                                    <?php foreach($moreProducts1 as $moreProduct1): ?>
                                        <div class="item85X95">
                                        	<div class="img">
                                            	<a href="<?php echo base_url(); ?>product/section/<?php echo $moreProduct1->proSection; ?>/category/<?php echo $moreProduct1->proCategory; ?>/detail/<?php echo $moreProduct1->proID; ?>/<?php echo url($moreProduct1->proName); ?>" title="">
                                                	<img src="<?php echo base_url().multi_thumbnail('thumbnail73X70_', $moreProduct1->proImage, IMAGE_PATH.'product/'.$moreProduct1->proDirImage.'/'); ?>" width="73" height="70" alt="<?php echo $moreProduct1->proName; ?>" />
                                                </a>
                                            </div>
                                            <div class="txt"><?php if((int)$moreProduct1->proPrice > 0){echo currency($moreProduct1->proPrice).' '.$moreProduct1->proCurrency;}else{echo lang('CALL');} ?></div>
                                        </div>
                                        <?php if($index%4 == 0): ?>
                                            <div class="clear"></div>
                                        <?php endif; ?>
                                        <?php $index++; ?>
                                    <?php endforeach; ?>
                                    <!--LOOP-->
                                    <div class="clear"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="right">
            	<div class="titleBG">
                	<div class="oTitleBG">
                    	<div class="iTitleBG">
                        	<div class="txt"><?php echo $introProduct2->secName; ?></div>
                        </div>
                    </div>
                </div>
                <div class="borderBlue367 mTop5">
                	<div class="oBorderBlue367">
                    	<div class="iBorderBlue367">
                        	<div class="newUp">
                            	<div class="top">
                                	<div class="img">
                                    	<a href="<?php echo base_url(); ?>product/section/<?php echo $introProduct2->proSection; ?>/category/<?php echo $introProduct2->proCategory; ?>/detail/<?php echo $introProduct2->proID; ?>/<?php echo url($introProduct2->proName); ?>" title="">
                                            <img src="<?php echo base_url().multi_thumbnail('thumbnail90X100_', $introProduct2->proImage, IMAGE_PATH.'product/'.$introProduct2->proDirImage.'/'); ?>" width="90" height="100" alt="<?php echo $introProduct2->proName; ?>" />
                                        </a>
                                    </div>
                                    <div class="info">
                                    	<ul>
                                        	<li class="title">
                                            	<a href="<?php echo base_url(); ?>product/section/<?php echo $introProduct2->proSection; ?>/category/<?php echo $introProduct2->proCategory; ?>/detail/<?php echo $introProduct2->proID; ?>/<?php echo url($introProduct2->proName); ?>" title="">
                                                    <?php echo sub($introProduct2->proName, 35); ?>
                                                </a>
                                            </li>
                                            <li>
                                            	<span class="label">Giá bán:</span>
                                                <span class="red"><b><?php if((int)$introProduct2->proPrice > 0){echo currency($introProduct2->proPrice).' '.$introProduct2->proCurrency;}else{echo lang('CALL');} ?></b></span>
                                                <!--<span class="gray"><i>(12.000 USD)</i></span>-->
                                            </li>
                                            <li>
                                            	<span class="label">Nơi bán:</span>
                                                <span><?php echo $introProduct2->preName; ?></span>
                                            </li>
                                            <li>
                                            	<span class="label">Cửa hàng:</span>
                                                <span>
                                                	<a class="vtip" href="<?php echo base_url().$introProduct2->shoLink; ?>" title=""><?php echo $introProduct2->shoName; ?></a>
                                                </span>
                                            </li>
                                            <li>
                                            	<span class="label">Bình chọn:</span>
                                                <span>
                                                    <?php for($i = 1; $i <= 5; $i++): ?>
                                                        <?php if((int)$introProduct2->proVote > 0 && $i <= (int)round(($introProduct2->proCountVote/$introProduct2->proVote))): ?>
                                                    	   <img src="<?php echo base_url(); ?>templates/home/images/starYellow1.gif" align="absmiddle" alt="" />
                                                        <?php else: ?>
                                                            <img src="<?php echo base_url(); ?>templates/home/images/starYellow0.gif" align="absmiddle" alt="" />
                                                        <?php endif; ?>
                                                    <?php endfor; ?>
                                                </span>
                                                <span class="blue"><b>[<?php echo $introProduct2->proVote; ?>]</b></span>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <hr />
                                <div class="bottom">
                                	<!--LOOP-->
                                    <?php $index = 1; ?>
                                    <?php foreach($moreProducts2 as $moreProduct2): ?>
                                        <div class="item85X95">
                                        	<div class="img">
                                            	<a href="<?php echo base_url(); ?>product/section/<?php echo $moreProduct2->proSection; ?>/category/<?php echo $moreProduct2->proCategory; ?>/detail/<?php echo $moreProduct2->proID; ?>/<?php echo url($moreProduct2->proName); ?>" title="">
                                                	<img src="<?php echo base_url().multi_thumbnail('thumbnail73X70_', $moreProduct2->proImage, IMAGE_PATH.'product/'.$moreProduct2->proDirImage.'/'); ?>" width="73" height="70" alt="<?php echo $moreProduct2->proName; ?>" />
                                                </a>
                                            </div>
                                            <div class="txt"><?php if((int)$moreProduct2->proPrice > 0){echo currency($moreProduct2->proPrice).' '.$moreProduct2->proCurrency;}else{echo lang('CALL');} ?></div>
                                        </div>
                                        <?php if($index%4 == 0): ?>
                                            <div class="clear"></div>
                                        <?php endif; ?>
                                        <?php $index++; ?>
                                    <?php endforeach; ?>
                                    <!--LOOP-->
                                    <div class="clear"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php endif; ?>
        <?php echo Modules::run('home/banner_module/index', 3); ?>
        <?php if(isset($introProduct3) && count($introProduct3) == 1 && isset($introProduct4) && count($introProduct4) == 1): ?>
        <div class="box" style="height:360px;">
        	<div class="left">
            	<div class="titleBG">
                	<div class="oTitleBG">
                    	<div class="iTitleBG">
                        	<div class="txt"><?php echo $introProduct3->secName; ?></div>
                        </div>
                    </div>
                </div>
                <div class="borderBlue367 mTop5">
                	<div class="oBorderBlue367">
                    	<div class="iBorderBlue367">
                        	<div class="newUp">
                            	<div class="top">
                                	<div class="img">
                                    	<a href="<?php echo base_url(); ?>product/section/<?php echo $introProduct3->proSection; ?>/category/<?php echo $introProduct3->proCategory; ?>/detail/<?php echo $introProduct3->proID; ?>/<?php echo url($introProduct3->proName); ?>" title="">
                                            <img src="<?php echo base_url().multi_thumbnail('thumbnail90X100_', $introProduct3->proImage, IMAGE_PATH.'product/'.$introProduct3->proDirImage.'/'); ?>" width="90" height="100" alt="<?php echo $introProduct3->proName; ?>" />
                                        </a>
                                    </div>
                                    <div class="info">
                                    	<ul>
                                        	<li class="title">
                                            	<a href="<?php echo base_url(); ?>product/section/<?php echo $introProduct3->proSection; ?>/category/<?php echo $introProduct3->proCategory; ?>/detail/<?php echo $introProduct3->proID; ?>/<?php echo url($introProduct3->proName); ?>" title="">
                                                    <?php echo sub($introProduct3->proName, 35); ?>
                                                </a>
                                            </li>
                                            <li>
                                            	<span class="label">Giá bán:</span>
                                                <span class="red"><b><?php if((int)$introProduct3->proPrice > 0){echo currency($introProduct3->proPrice).' '.$introProduct3->proCurrency;}else{echo lang('CALL');} ?></b></span>
                                                <!--<span class="gray"><i>(12.000 USD)</i></span>-->
                                            </li>
                                            <li>
                                            	<span class="label">Nơi bán:</span>
                                                <span><?php echo $introProduct3->preName; ?></span>
                                            </li>
                                            <li>
                                            	<span class="label">Cửa hàng:</span>
                                                <span>
                                                	<a class="vtip" href="<?php echo base_url().$introProduct3->shoLink; ?>" title=""><?php echo $introProduct3->shoName; ?></a>
                                                </span>
                                            </li>
                                            <li>
                                            	<span class="label">Bình chọn:</span>
                                                <span>
                                                    <?php for($i = 1; $i <= 5; $i++): ?>
                                                        <?php if((int)$introProduct3->proVote > 0 && $i <= (int)round(($introProduct3->proCountVote/$introProduct3->proVote))): ?>
                                                    	   <img src="<?php echo base_url(); ?>templates/home/images/starYellow1.gif" align="absmiddle" alt="" />
                                                        <?php else: ?>
                                                            <img src="<?php echo base_url(); ?>templates/home/images/starYellow0.gif" align="absmiddle" alt="" />
                                                        <?php endif; ?>
                                                    <?php endfor; ?>
                                                </span>
                                                <span class="blue"><b>[<?php echo $introProduct3->proVote; ?>]</b></span>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <hr />
                                <div class="bottom">
                                	<!--LOOP-->
                                    <?php $index = 1; ?>
                                    <?php foreach($moreProducts3 as $moreProduct3): ?>
                                        <div class="item85X95">
                                        	<div class="img">
                                            	<a href="<?php echo base_url(); ?>product/section/<?php echo $moreProduct3->proSection; ?>/category/<?php echo $moreProduct3->proCategory; ?>/detail/<?php echo $moreProduct3->proID; ?>/<?php echo url($moreProduct3->proName); ?>" title="">
                                                	<img src="<?php echo base_url().multi_thumbnail('thumbnail73X70_', $moreProduct3->proImage, IMAGE_PATH.'product/'.$moreProduct3->proDirImage.'/'); ?>" width="73" height="70" alt="<?php echo $moreProduct3->proName; ?>" />
                                                </a>
                                            </div>
                                            <div class="txt"><?php if((int)$moreProduct3->proPrice > 0){echo currency($moreProduct3->proPrice).' '.$moreProduct3->proCurrency;}else{echo lang('CALL');} ?></div>
                                        </div>
                                        <?php if($index%4 == 0): ?>
                                            <div class="clear"></div>
                                        <?php endif; ?>
                                        <?php $index++; ?>
                                    <?php endforeach; ?>
                                    <!--LOOP-->
                                    <div class="clear"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="right">
            	<div class="titleBG">
                	<div class="oTitleBG">
                    	<div class="iTitleBG">
                        	<div class="txt"><?php echo $introProduct4->secName; ?></div>
                        </div>
                    </div>
                </div>
                <div class="borderBlue367 mTop5">
                	<div class="oBorderBlue367">
                    	<div class="iBorderBlue367">
                        	<div class="newUp">
                            	<div class="top">
                                	<div class="img">
                                    	<a href="<?php echo base_url(); ?>product/section/<?php echo $introProduct4->proSection; ?>/category/<?php echo $introProduct4->proCategory; ?>/detail/<?php echo $introProduct4->proID; ?>/<?php echo url($introProduct4->proName); ?>" title="">
                                            <img src="<?php echo base_url().multi_thumbnail('thumbnail90X100_', $introProduct4->proImage, IMAGE_PATH.'product/'.$introProduct4->proDirImage.'/'); ?>" width="90" height="100" alt="<?php echo $introProduct4->proName; ?>" />
                                        </a>
                                    </div>
                                    <div class="info">
                                    	<ul>
                                        	<li class="title">
                                            	<a href="<?php echo base_url(); ?>product/section/<?php echo $introProduct4->proSection; ?>/category/<?php echo $introProduct4->proCategory; ?>/detail/<?php echo $introProduct4->proID; ?>/<?php echo url($introProduct4->proName); ?>" title="">
                                                    <?php echo sub($introProduct4->proName, 35); ?>
                                                </a>
                                            </li>
                                            <li>
                                            	<span class="label">Giá bán:</span>
                                                <span class="red"><b><?php if((int)$introProduct4->proPrice > 0){echo currency($introProduct4->proPrice).' '.$introProduct4->proCurrency;}else{echo lang('CALL');} ?></b></span>
                                                <!--<span class="gray"><i>(12.000 USD)</i></span>-->
                                            </li>
                                            <li>
                                            	<span class="label">Nơi bán:</span>
                                                <span><?php echo $introProduct4->preName; ?></span>
                                            </li>
                                            <li>
                                            	<span class="label">Cửa hàng:</span>
                                                <span>
                                                	<a class="vtip" href="<?php echo base_url().$introProduct4->shoLink; ?>" title=""><?php echo $introProduct4->shoName; ?></a>
                                                </span>
                                            </li>
                                            <li>
                                            	<span class="label">Bình chọn:</span>
                                                <span>
                                                    <?php for($i = 1; $i <= 5; $i++): ?>
                                                        <?php if((int)$introProduct4->proVote > 0 && $i <= (int)round(($introProduct4->proCountVote/$introProduct4->proVote))): ?>
                                                    	   <img src="<?php echo base_url(); ?>templates/home/images/starYellow1.gif" align="absmiddle" alt="" />
                                                        <?php else: ?>
                                                            <img src="<?php echo base_url(); ?>templates/home/images/starYellow0.gif" align="absmiddle" alt="" />
                                                        <?php endif; ?>
                                                    <?php endfor; ?>
                                                </span>
                                                <span class="blue"><b>[<?php echo $introProduct4->proVote; ?>]</b></span>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <hr />
                                <div class="bottom">
                                	<!--LOOP-->
                                    <?php $index = 1; ?>
                                    <?php foreach($moreProducts4 as $moreProduct4): ?>
                                        <div class="item85X95">
                                        	<div class="img">
                                            	<a href="<?php echo base_url(); ?>product/section/<?php echo $moreProduct4->proSection; ?>/category/<?php echo $moreProduct4->proCategory; ?>/detail/<?php echo $moreProduct4->proID; ?>/<?php echo url($moreProduct4->proName); ?>" title="">
                                                	<img src="<?php echo base_url().multi_thumbnail('thumbnail73X70_', $moreProduct4->proImage, IMAGE_PATH.'product/'.$moreProduct4->proDirImage.'/'); ?>" width="73" height="70" alt="<?php echo $moreProduct4->proName; ?>" />
                                                </a>
                                            </div>
                                            <div class="txt"><?php if((int)$moreProduct4->proPrice > 0){echo currency($moreProduct4->proPrice).' '.$moreProduct4->proCurrency;}else{echo lang('CALL');} ?></div>
                                        </div>
                                        <?php if($index%4 == 0): ?>
                                            <div class="clear"></div>
                                        <?php endif; ?>
                                        <?php $index++; ?>
                                    <?php endforeach; ?>
                                    <!--LOOP-->
                                    <div class="clear"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php endif; ?>
        <div class="bannerDouble">
        	<?php echo Modules::run('home/banner_module/index', 4); ?>
            <?php echo Modules::run('home/banner_module/index', 5); ?>
        </div>
        <div class="box mTop12" style="height:215px;">
        	<div class="left">
            	<?php echo Modules::run('home/ads_module/vip'); ?>
            </div>
            <div class="right">
                <?php echo Modules::run('home/job_module/lastest'); ?>
            </div>
        </div>
    </div>
    <div class="clear"></div>
    <div class="box mTop12">
    	<?php echo Modules::run('home/shop_module/bestshop'); ?>
    </div>
    <div class="box">
    	<?php echo Modules::run('home/product_module/popular'); ?>
    </div>
    <div class="clear"></div>
</div>
<!--END Main-->
<?php $this->load->view('home/global/footer'); ?>